﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LybrixNursingCRMDesktop.CustomControls
{
    /// <summary>
    /// Interaction logic for SearchResultLabel.xaml
    /// </summary>
    public partial class SearchResultLabel : UserControl
    {
        #region SearchType enum

        public enum SearchType
        {
            Prospects,
            Users
        };

        #endregion

        private SearchType type;


        #region Public Methods

        public SearchResultLabel()
        {
            InitializeComponent();
        }

        public SearchType TypeOfSearch
        {
            set { type = value; }
        }

        public void SetSearchLabel(int count)
        {
            string properCounter = string.Empty;
            string properString = string.Empty;

            switch (type)
            {
                case SearchType.Prospects:
                    //Empty Result
                    if (count == 0)
                        properString = FindResource("LabelProspectSearchNotFound").ToString();
                    //There is Some Result
                    else
                    {
                        properString = FindResource("LabelProspectSearchFound").ToString();
                        properCounter = count.ToString();
                        ;
                    }
                    break;
            }
            LabelString.Content = properString;
            LabelNumber.Content = properCounter;
        }

        #endregion
    }
}
